package com.rao.quartz.service.serviceImpl;

import com.rao.entity.InfoGoods;
import com.rao.entity.UserGoods;
import com.rao.quartz.mapper.InfoGoodsMapper;
import com.rao.quartz.service.serviceInterface.InfoGoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: raoguang
 * @Date: 2022/05/28/22:27
 * @Description:
 */
@Service
public class InfoGoodsServiceImpl implements InfoGoodsService {

    @Autowired
    private InfoGoodsMapper infoGoodsMapper;

    @Override
    public List<InfoGoods> getAllGoodsInfo() {
        return null;
    }

    @Override
    public InfoGoods getOneGoodsInfo(String goodsId) {
        return infoGoodsMapper.getOneGoodsInfo(goodsId);
    }

    @Override
    public UserGoods getUserGoodsInfo(String userId) {
        return infoGoodsMapper.getUserGoodsInfo(userId);
    }

    @Override
    public boolean insertGoodsInfo(InfoGoods infoGoods) {
        boolean ifSuccess = infoGoodsMapper.insertOneGoodInfo(infoGoods);
        return true;
    }
}
